#include <iostream>
#include <iterator>
#include <algorithm>
#include <vector>

using std::cout;
using std::endl;
using std::vector;
using std::ostream_iterator;

int main()
{
    vector<int> numbers{1, 2, 3, 4, 5};
    //将输出流也看成是一个容器
    ostream_iterator<int> osi(cout, " ");
    std::copy(numbers.begin(), numbers.end(), osi);
    cout << endl;

    //auto it = numbers.begin();
    //cout << *it << " ";

    return 0;
}

